package com.steria.workshop.android.yrapp.lib.model;

import java.text.SimpleDateFormat;
import java.util.Date;

public class WeatherPeriod {

	private Date from;
	private Date to;
	private double precipitation;
	private String symbol;

	public void setFrom(Date fromDate) {
		from = fromDate;
	}

	public void setTo(Date toDate) {
		to = toDate;
	}

	public void setPrecipitation(Double value) {
		precipitation = value;

	}

	public void setSymbol(String value) {
		symbol = value;
	}

	public Date getFrom() {
		return from;
	}

	public Date getTo() {
		return to;
	}

	public double getPrecipitation() {
		return precipitation;
	}

	public String getSymbol() {
		return symbol;
	}

	@Override
	public String toString() {
		SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		String formattedFrom = formatter.format(from);
		String formattedTo = formatter.format(to);
		return (formattedFrom + " - " + formattedTo + "\n" + symbol);
	}
}
